package org.springblade.modules.repair.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springblade.common.utils.validation.constraints.DatePattern;
import org.springblade.core.secure.utils.AuthUtil;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Description 保养计划日历图
 * @Author ysq
 * @Date 2023/5/24
 **/
@Data
public class MaintainPlanCalendarDataDTO {

	@DatePattern(message = "起始日期格式不正确，正确格式为：yyyy-MM-dd")
	@NotBlank(message = "起始日期不能为空")
	@ApiModelProperty(value = "起始日期")
	private String startDate;

	@DatePattern(message = "截止日期格式不正确，正确格式为：yyyy-MM-dd")
	@NotBlank(message = "截止日期不能为空")
	@ApiModelProperty(value = "截止日期")
	private String endDate;

	@NotNull(message = "电梯id集合不能为空")
	@ApiModelProperty(value = "电梯id集合")
	private List<Long> elevatorIds;

	private String tenantId;

	public String getTenantId() {
		return AuthUtil.getTenantId();
	}
}
